package com.gywj.race.wxPub;

/**
 * 微信公众号常量
 */
public class WxPubConstants {

    public static final String FIELD_ERRCODE = "errcode";
    public static final String FIELD_ERRMSG = "errmsg";
    public static final String FIELD_SUCCESS = "success";

    public static final String WX_ERRCODE = "0";

    /**
     * 微信二维码ticket失效时间30天(2592000）
     */
    public static final int WX_QRCODE_TICKET_EXPIRE_SEC = 2592000;
    public static final int WX_QRCODE_TICKET_EXPIRE_DAY = 29;

    /**
     * 微信临时素材失效时间3天
     */
    public static final int WX_MEDIA_EXPIRE = 3;

    /**
     * 网页授权scope
     * WX_OAUTH2_SCOPE_BASE  scope为snsapi_base
     * WX_OAUTH2_SCOPE_USERINFO scope为snsapi_userinfo
     */
    public static final String WX_OAUTH2_SCOPE_BASE = "snsapi_base";
    public static final String WX_OAUTH2_SCOPE_USERINFO = "snsapi_userinfo";

    /**
     * 微信消息
     * 消息的类型
     * WX_MESSAGE_MSGTYPE_TEXT  文本消息
     * WX_MESSAGE_MSGTYPE_IMAGE  图片消息
     * WX_MESSAGE_MSGTYPE_NEWS  图文消息
     * WX_MESSAGE_MSGTYPE_EVENT  event事件
     * 消息事件推送
     * WX_MESSAGE_EVENT_SUBSCRIBE  订阅
     * WX_MESSAGE_EVENT_UNSUBSCRIBE  取消订阅
     * WX_MESSAGE_EVENT_SCAN  扫码
     * WX_MESSAGE_EVENT_LOCATION 上报地理位置
     * WX_MESSAGE_EVENT_CLICK 点击菜单拉取消息
     * WX_MESSAGE_EVENT_VIEW 点击菜单跳转链接
     */
    public static final String WX_MESSAGE_MSGTYPE_TEXT = "text";
    public static final String WX_MESSAGE_MSGTYPE_IMAGE = "image";
    public static final String WX_MESSAGE_MSGTYPE_NEWS = "news";
    public static final String WX_MESSAGE_MSGTYPE_EVENT = "event";

    public static final String WX_MESSAGE_EVENT_SUBSCRIBE = "subscribe";
    public static final String WX_MESSAGE_EVENT_UNSUBSCRIBE = "unsubscribe";
    public static final String WX_MESSAGE_EVENT_SCAN = "SCAN";
    public static final String WX_MESSAGE_EVENT_LOCATION = "LOCATION";
    public static final String WX_MESSAGE_EVENT_CLICK = "CLICK";
    public static final String WX_MESSAGE_EVENT_VIEW = "VIEW";

    /**
     * 客服消息类型
     * <p>
     * 发送文本消息
     * 发送图片消息
     * 发送图文消息
     * </p>
     */
    public static final String WX_CUSTOM_MSGTYPE_TEXT = "text";
    public static final String WX_CUSTOM_MSGTYPE_IMAGE = "image";
    public static final String WX_CUSTOM_MSGTYPE_NEWS = "news";

    /**
     * 模板消息的key
     */
    public static final String WX_TEMPLATE_FIRST = "first";
    public static final String WX_TEMPLATE_KEY1 = "keyword1";
    public static final String WX_TEMPLATE_KEY2 = "keyword2";
    public static final String WX_TEMPLATE_KEY3 = "keyword3";
    public static final String WX_TEMPLATE_KEY4 = "keyword4";
    public static final String WX_TEMPLATE_REMARK = "remark";

    public static final String WX_TEMPLATE_WORD_COLOR_BLUE = "#173177";


    /**
     * 创建二维码
     * <p>
     *     二维码类型
     *     action_name
     *     QR_SCENE为临时的整型参数值
     *     QR_STR_SCENE为临时的字符串参数值
     *     QR_LIMIT_SCENE为永久的整型参数值
     *     QR_LIMIT_STR_SCENE为永久的字符串参数值
     *     场景值ID
     *     scene_id  32位非0整型
     *     scene_str 字符串类型
     * </p>
     */
    public static final String WX_QR_SCENE = "QR_SCENE";
    public static final String WX_QR_STR_SCENE = "QR_STR_SCENE";
    public static final String WX_QR_LIMIT_SCENE = "QR_LIMIT_SCENE";
    public static final String WX_QR_LIMIT_STR_SCENE = "QR_LIMIT_STR_SCENE";

    public static final String WX_SCENE_ID = "scene_id";
    public static final String WX_SCENE_STR = "scene_str";

    /**
     * 媒体文件类型
     * <p>
     * 图片（image）: 2M，支持PNG\JPEG\JPG\GIF格式
     * 语音（voice）：2M，播放长度不超过60s，支持AMR\MP3格式
     * 视频（video）：10MB，支持MP4格式
     * 缩略图（thumb）：64KB，支持JPG格式
     * </p>
     */
    public static final String WX_MEDIA_IMAGE = "image";
    public static final String WX_MEDIA_VOICE = "voice";
    public static final String WX_MEDIA_VIDEO = "video";
    public static final String WX_MEDIA_THUMB = "thumb";


    /**
     * 微信公众号接口
     * <p>
     * 获取access_token  WX_ACCESS_TOKEN_URL
     * 获取网页授权code   WX_OAUTH2_CODE_URL
     * 获取网页授权access_token   WX_ACCESS_OAUTH2_TOKEN_URL
     * 拉取用户信息       WX_USERINFO_URL
     * 获取生成的签名     WX_JSAPI_TICKET_URL
     * 创建二维码ticket  WX_CREATE_QRCODE_URL
     * 通过ticket换取二维码 WX_SHOW_QRCODE_URL
     * 长链接转短链接接口  WX_SHORTURL_URL
     * 自定义菜单创建  WX_CREATE_MENU_URL
     * 设置所属行业(POST)     WX_SET_INDUSTRY_URL
     * 获取设置的行业信息 WX_GET_INDUSTRY_URL
     * 获得模板ID(POST)  WX_ADD_TEMPLATE_URL
     * 获取模板列表     WX_ALL_PRIVATE_TEMPLATE_URL
     * 删除模板        WX_DEL_PRIVATE_TEMPLATE_URL
     * 发送模板信息    WX_SEND_TEMPLATE_MESSAGE_URL
     * 添加客服帐号    WX_ADD_CUSTOMESERVICE_ACCOUNT_URL
     * 获取所有客服账号 WX_ALL_CUSTOMESERVICE_ACCOUNT_URL
     * 客服接口-发消息  WX_SEND_CUSTOMESERVICE_MESSAGE_URL
     * 新增临时素材   WX_UPLOAD_MEIDA_URL
     * 获取临时素材   WX_GET_MEIDA_URL
     * 新增永久图文素材  WX_ADD_NEWS_URL
     * 上传图文消息内的图片获取URL WX_UPLOAD_IMG_MATERIAL_URL
     * 新增其他类型永久素材  WX_ADD_MATERIAL_URL
     * 获取永久素材  WX_GET_MATERIAL_URL
     * 删除永久素材  WX_DEL_MATERIAL_URL
     * 获取素材列表  WX_GET_MATERIAL_LIST_URL
     * </p>
     */
    public final static String WX_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET";
    public final static String WX_OAUTH2_CODE_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect";
    public final static String WX_ACCESS_OAUTH2_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
    public final static String WX_USERINFO_URL = "https://api.weixin.qq.com/sns/userinfo?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN";
    public final static String WX_JSAPI_TICKET_URL = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=ACCESS_TOKEN&type=jsapi";
    public final static String WX_CREATE_QRCODE_URL = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=TOKEN";
    public final static String WX_SHOW_QRCODE_URL = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=TICKET";
    public final static String WX_SHORTURL_URL = "https://api.weixin.qq.com/cgi-bin/shorturl?access_token=ACCESS_TOKEN";
    public final static String WX_CREATE_MENU_URL = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=ACCESS_TOKEN";
    public final static String WX_SET_INDUSTRY_URL = "https://api.weixin.qq.com/cgi-bin/template/api_set_industry?access_token=ACCESS_TOKEN";
    public final static String WX_GET_INDUSTRY_URL = "https://api.weixin.qq.com/cgi-bin/template/get_industry?access_token=ACCESS_TOKEN";
    public final static String WX_ADD_TEMPLATE_URL = "https://api.weixin.qq.com/cgi-bin/template/api_add_template?access_token=ACCESS_TOKEN";
    public final static String WX_ALL_PRIVATE_TEMPLATE_URL = "https://api.weixin.qq.com/cgi-bin/template/get_all_private_template?access_token=ACCESS_TOKEN";
    public final static String WX_DEL_PRIVATE_TEMPLATE_URL = "https://api.weixin.qq.com/cgi-bin/template/del_private_template?access_token=ACCESS_TOKEN";
    public final static String WX_SEND_TEMPLATE_MESSAGE_URL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=ACCESS_TOKEN";
    public final static String WX_ADD_CUSTOMESERVICE_ACCOUNT_URL = "https://api.weixin.qq.com/customservice/kfaccount/add?access_token=ACCESS_TOKEN";
    public final static String WX_ALL_CUSTOMESERVICE_ACCOUNT_URL = "https://api.weixin.qq.com/cgi-bin/customservice/getkflist?access_token=ACCESS_TOKEN";
    public final static String WX_SEND_CUSTOMESERVICE_MESSAGE_URL = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN";
    public final static String WX_UPLOAD_MEIDA_URL = "https://api.weixin.qq.com/cgi-bin/media/upload?access_token=ACCESS_TOKEN&type=TYPE";
    public final static String WX_GET_MEIDA_URL = "https://api.weixin.qq.com/cgi-bin/media/get?access_token=ACCESS_TOKEN&media_id=MEDIA_ID";
    public final static String WX_ADD_NEWS_URL = "https://api.weixin.qq.com/cgi-bin/material/add_news?access_token=ACCESS_TOKEN";
    public final static String WX_UPLOAD_IMG_MATERIAL_URL = "https://api.weixin.qq.com/cgi-bin/media/uploadimg?access_token=ACCESS_TOKEN";
    public final static String WX_ADD_MATERIAL_URL = "https://api.weixin.qq.com/cgi-bin/material/add_material?access_token=ACCESS_TOKEN&type=TYPE";
    public final static String WX_GET_MATERIAL_URL = "https://api.weixin.qq.com/cgi-bin/material/get_material?access_token=ACCESS_TOKEN";
    public final static String WX_DEL_MATERIAL_URL = "https://api.weixin.qq.com/cgi-bin/material/del_material?access_token=ACCESS_TOKEN";
    public final static String WX_GET_MATERIAL_LIST_URL = "https://api.weixin.qq.com/cgi-bin/material/batchget_material?access_token=ACCESS_TOKEN";



}

